//
//  THTimeTableIViewCellSub.m
//  TaiHaoCloud
//
//  Created by rzm on 16/6/14.
//  Copyright © 2016年 rzm. All rights reserved.
//

#import "SampuxTimeViewListCellSub.h"

@implementation SampuxTimeViewListCellSub

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        [self loadUI];
    }
    return self;
}

- (void)loadUI
{
    CGFloat font = 8.;
    if (IS_IPHONE_4_OR_LESS) {
        font = 12.;
    }else if (IS_IPHONE_5_OR_LESS)
    {
        font = 14.;
    }else if (IS_IPHONE_6)
    {
        font = 16.;
    }else
    {
        font = 16.;
    }
    UIView *backView = [[UIView alloc]initWithFrame:CGRectMake(Sampux6WScale(35), 0, kScreenWidth - Sampux6WScale(35)*2, self.height)];
    [self addSubview:backView];
    self.backView = backView;
    backView.backgroundColor = THSystemClearColor;
//    [UIView createLineViewInbottom:backView];
    
    _line = [[UIView alloc]initWithFrame:CGRectMake(0, backView.height, backView.width, 1)];
    [backView addSubview:_line];
    _line.backgroundColor = THWhiteAlplaColor(0.2);
    
    _timeImg = [UIButton createButton];
    _timeImg.frame = CGRectMake(Sampux6WScale(4), backView.height * 0.2, backView.height * 0.6, backView.height * 0.6);
    [backView addSubview:_timeImg];

    _timeLabel = [[UILabel alloc]initWithFrame:CGRectMake(_timeImg.right + Sampux6WScale(37), backView.height * 0.2, backView.width * 0.2, backView.height * 0.6)];
    [backView addSubview:_timeLabel];
    _timeLabel.textColor = THWhiteAlplaColor(0.8);
    _timeLabel.font = THFont(font);
    
    _speedLabel = [[UILabel alloc]initWithFrame:CGRectMake(backView.width - Sampux6WScale(4) - Sampux6WScale(60) , backView.height * 0.2, Sampux6WScale(60), self.height * 0.6)];
    _speedLabel.font = THFont(font);
    _speedLabel.textColor = THWhiteAlplaColor(0.8);
    _speedLabel.textAlignment = NSTextAlignmentRight;
    [backView addSubview:_speedLabel];
//    [UIView createLineViewInbottom:self];

}


@end
